home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / util / cd_link.doc < prev   
Text File  |  1993-01-08  |  4KB  |  120 lines

  1. The cd_link Program:
  2.  
  3.  
  4.     The 'cd_link' program, creates a set of symbolic links
  5. from a specified target directory to the files/directories
  6. stored on a CD-ROM created by 'Makedisc', ISO/Rock Ridge
  7. Formatting Software from Young Minds, Inc..  The program uses a
  8. 'cdrom_directory' to search for a translation file (for example,
  9. 00_TRANS.TBL).  If found the program uses the translation file to
  10. build a set of symbolic links to the other files (and
  11. directories if the '-r' option is given) in the cdrom_directory,
  12. using the original UNIX-style file and directory names for the
  13. links.  This utility is particularly useful for compiling source
  14. code straight off of the CD-ROM disc or for having access to
  15. known UNIX-style libraries without having to load them off the
  16. CD-ROM onto your hard disk. 
  17.  
  18.     Usage for cd_link is as follows:
  19.  
  20. cd_link [-rR] [cdrom_directory] [target directory]
  21.  
  22.     The -r option will recursively descend the subdirectory
  23. rooted at cdrom_directory creating links at each level.
  24.  
  25.     The -R option is for use with a Rock Ridge driver and will
  26. create links to an image with Rock Ridge extensions.
  27.  
  28.     The following example demonstrates how to create the
  29. symbolic links necessary to recreate the directory tree for
  30. gnuplot in the directory '~my_account/gnuplot' (where the CD-ROM
  31. image has been mounted as '/cd-rom_disc'):
  32.  
  33. cd ~my_account
  34.     
  35. Move to the ~my_account directory.
  36.  
  37.     In order to support as many end users of CD-ROM as
  38. possible, (some of which are probably unanticipated) the
  39. cd_link utility is provided in source form.  So, if binaries
  40. are not present on your platform, you can create them by
  41. compiling the source code with a standard ANSI C compiler
  42. (available on most UNIX platforms).
  43.  
  44.  
  45.     First, copy the source to your current directory:
  46.  
  47. cp /cd-rom/ym_utils/"cd_link.c;1" cd_link.c
  48.  
  49.     The quotes around the cd_link.c;1 are necessary to prevent
  50. the shell from interferring with the operation.  Next, enter:
  51.  
  52. cc -o cd_link cd_link.c
  53.  
  54.     This will create an executable called cd_link.  On some
  55. platforms it may be necessary to link in a BSD compatibility
  56. library.  Check with your system administrator or operating
  57. system documentation to see if this is the case for your machine.
  58. If so, to get cd_link to compile you should enter the following
  59. command:
  60.  
  61. cc -o cd_link cd_link.c /usr/lib/libBSD.a
  62.  
  63. Once you have an executable, enter the following commands:
  64.  
  65. mkdir gnuplot
  66.  
  67. Create the gnuplot directory to use in recreating the directory
  68. tree.
  69.  
  70. cd gnuplot
  71.  
  72. Move to the gnuplot directory.
  73.  
  74. ../cd_link -r /cd-rom_disc/x11r2/gnuplot
  75.  
  76. or, if you want to direct output to the gnuplot directory from
  77. elsewhere, try:
  78.  
  79. cd_link -r /cd-rom_disc/x11r5/gnuplot <PATH>/gnuplot
  80.  
  81. where <PATH> is the path to the gnuplot directory.
  82.  
  83.     It will take a little while, but once it's finished,
  84. listing the contents of your gnuplot directory will now show
  85. the files in the gnuplot directory on the CD-ROM, except that
  86. the original UNIX filenames will appear instead of the actual,
  87. translated filenames on the CD-ROM.  If you want to see how
  88. they are different, you save the listings of both your gnuplot
  89. directory and the one on the CD-ROM to files and apply the
  90. 'diff' utility.
  91.  
  92.  
  93. NOTE:  While all filenames on CD-ROM discs from Young Minds, Inc.
  94. are stored using uppercase letters, some CD-ROM file system
  95. drivers will automatically convert the filename characters to
  96. lowercase.
  97.  
  98.     The directory 'cdrom_directory' need not reside on a
  99. CD-ROM disc, as long as it contains a copy of all files from
  100. a directory on a CD-ROM disc (and that directory's
  101. subdirectories if you wish to use the -r option).
  102.  
  103.     Also, while the current version of Makedisc generates
  104. translation table entries for block device nodes, character
  105. device nodes, pipes and sockets (denoted as B, C, P, and S), the
  106. current version of cd_link ignores these entries since there is
  107. as yet no well-defined, machine-independant mapping for these
  108. entries.
  109.  
  110. NOTE:  While there is no reason why the program could not be
  111. useful in making directory trees of symbolic links to
  112. arbitrary directories, the required translation file only
  113. allows the program to be used on a directory (or directory tree)
  114. that contains correct translation files.
  115.  
  116.     Once you have successfully created the executable, you
  117. may wish to store it in some commonly accessible location like
  118. '/usr/local/bin'.
  119.  
  120.